﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Shove.Web.UI;

public partial class UserControls_CopyRightInfo : UCBase 
{
    public UserControls_CopyRightInfo()
    {
        Name = "版权信息";

        swpas = new ShoveWebPartAttribute[28];
    
        swpas[0] = new ShoveWebPartAttribute_Int("控件宽度", "1,1021", 800, "控件宽度");
        swpas[1] = new ShoveWebPartAttribute_Int("logo图片宽度", "1,500", 153, "logo图片宽度");
        swpas[2] = new ShoveWebPartAttribute_Int("logo图片高度", "1,400", 71, "logo图片高度");
        swpas[3] = new ShoveWebPartAttribute_Int("分割线图片宽度", "1,800", 447, "分割线图片宽度");
        swpas[4] = new ShoveWebPartAttribute_Int("分割线图片高度", "1,400", 42, "分割线图片高度");

        swpas[5] = new ShoveWebPartAttribute_Image("控件背景图片", "", "background-image: url(images/foot_bg_line.jpg)", "控件背景图片");
        swpas[6] = new ShoveWebPartAttribute_Image("logo图片", "", "images/UserControls/1_01.jpg", "logo图片");
        swpas[7] = new ShoveWebPartAttribute_Image("分割线图片", "", "images/UserControls/1_03.jpg", "分割线图片");
        swpas[8] = new ShoveWebPartAttribute_Text("联系我们CSS样式", "", "blue12", "联系我们CSS样式");

        swpas[9] = new ShoveWebPartAttribute_Image("底部图片1", "", "images/link_1.jpg", "底部图片1");
        swpas[10] = new ShoveWebPartAttribute_Image("底部图片2", "", "images/link_2.jpg", "底部图片2");
        swpas[11] = new ShoveWebPartAttribute_Image("底部图片3", "", "images/link_3.jpg", "底部图片3");
        swpas[12] = new ShoveWebPartAttribute_Image("底部图片4", "", "images/link_4.jpg", "底部图片4");
        swpas[13] = new ShoveWebPartAttribute_Image("底部图片5", "", "images/link_5.jpg", "底部图片5");
        swpas[14] = new ShoveWebPartAttribute_Image("底部图片6", "", "images/link_6.jpg", "底部图片6");
        swpas[15] = new ShoveWebPartAttribute_Image("底部图片7", "", "images/link_7.jpg", "底部图片7");
        swpas[16] = new ShoveWebPartAttribute_Image("底部图片8", "", "images/link_8.jpg", "底部图片8");
        swpas[17] = new ShoveWebPartAttribute_Image("底部图片9", "", "images/link_9.jpg", "底部图片9");

        swpas[18] = new ShoveWebPartAttribute_Int("底部图片1宽度", "1,500", 52, "底部图片1宽度");
        swpas[19] = new ShoveWebPartAttribute_Int("底部图片2宽度", "1,500", 56, "底部图片2宽度");
        swpas[20] = new ShoveWebPartAttribute_Int("底部图片3宽度", "1,500", 79, "底部图片3宽度");
        swpas[21] = new ShoveWebPartAttribute_Int("底部图片4宽度", "1,500", 69, "底部图片4宽度");
        swpas[22] = new ShoveWebPartAttribute_Int("底部图片5宽度", "1,500", 78, "底部图片5宽度");
        swpas[23] = new ShoveWebPartAttribute_Int("底部图片6宽度", "1,500", 76, "底部图片6宽度");
        swpas[24] = new ShoveWebPartAttribute_Int("底部图片7宽度", "1,500", 82, "底部图片7宽度");
        swpas[25] = new ShoveWebPartAttribute_Int("底部图片8宽度", "1,500", 96, "底部图片8宽度");
        swpas[26] = new ShoveWebPartAttribute_Int("底部图片9宽度", "1,500", 78, "底部图片9宽度");
        swpas[27] = new ShoveWebPartAttribute_Int("底部图片高度", "1,500", 25, "底部图片高度");
    }

    private void InitlayOut()
    {
        div1.Style.Add("background-image","url('"+swpAttributes[5]+"')");
        tabctr.Width = swpAttributes[0];
        imglogo.Src = "~/" + swpAttributes[6];
        imglogo.Width = Shove._Convert.StrToInt(swpAttributes[1], 153);
        imglogo.Height = Shove._Convert.StrToInt(swpAttributes[2], 71);

        span1.Attributes.Add("class", swpAttributes[8]);

        tdline.Height = Shove._Convert.StrToInt(swpAttributes[4], 42);
        tdline.Width = Shove._Convert.StrToInt(swpAttributes[3], 447);
        tdline.Src = "~/" + swpAttributes[7];

        img1.Src = "~/" + swpAttributes[9];
        img2.Src = "~/" + swpAttributes[10];
        img3.Src = "~/" + swpAttributes[11];
        img4.Src = "~/" + swpAttributes[12];
        img5.Src = "~/" + swpAttributes[13];
        img6.Src = "~/" + swpAttributes[14];
        img7.Src = "~/" + swpAttributes[15];
        img8.Src = "~/" + swpAttributes[16];
        img9.Src = "~/" + swpAttributes[17];

        img1.Width = Shove._Convert.StrToInt(swpAttributes[18], 52);
        img2.Width = Shove._Convert.StrToInt(swpAttributes[19], 56);
        img3.Width = Shove._Convert.StrToInt(swpAttributes[20], 79);
        img4.Width = Shove._Convert.StrToInt(swpAttributes[21], 69);
        img5.Width = Shove._Convert.StrToInt(swpAttributes[22], 78);
        img6.Width = Shove._Convert.StrToInt(swpAttributes[23], 76);
        img7.Width = Shove._Convert.StrToInt(swpAttributes[24], 82);
        img8.Width = Shove._Convert.StrToInt(swpAttributes[25], 96);
        img9.Width = Shove._Convert.StrToInt(swpAttributes[26], 78);

        img1.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img2.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img3.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img4.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img5.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img6.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img7.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img8.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
        img9.Height = Shove._Convert.StrToInt(swpAttributes[27], 25);
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        InitlayOut();

        //DataTable dt = BLL.ShopSiteBLL.GetShopSiteInfo(this.SiteID);
        //if (dt != null && dt.Rows.Count > 0)
        //{
        //    this.tdCopyRightInfo.InnerText = dt.Rows[0]["CopyRightInfo"].ToString();
        //}
    }
}
